<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>信华信银行卡系统</title>
    <!-- Bootstrap -->
    <link href="css/bootstrap-4.0.0.css" rel="stylesheet">
    <link rel="stylesheet" href="css/home-page.css">
</head>
<body>
<div th:insert="fragment/header :: top-header"></div>
<div id="msg-box"></div>
<div class="container mt-3">
    <div class="row">
        <div class="col-12">
            <div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
                <ol class="carousel-indicators">
                    <li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
                    <li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
                    <li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
                </ol>
                <div class="carousel-inner">
                    <div class="carousel-item active">
                        <img  src="images/head1.JPG" alt="First slide">
                    </div>
                    <div class="carousel-item">
                        <img src="images/head1.JPG" alt="Second slide">
                    </div>
                    <div class="carousel-item">
                        <img src="images/head1.JPG" alt="Third slide">
                    </div>
                </div>
                <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
                    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                    <span class="sr-only">Previous</span>
                </a>
                <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
                    <span class="carousel-control-next-icon" aria-hidden="true"></span>
                    <span class="sr-only">Next</span>
                </a>
            </div>
        </div>
    </div>
    <hr>
</div>
<section>
    <div class="container" >
        <div class="row">
            <div class="col-lg-4 col-md-6 col-12" th:each="item : ${cardList}">
                <ul class="list-unstyled">
                    <li class="media">
                        <div class="media-body">
                            <img class="mr-3" th:src="${item.card_img}" alt="Mastercard®個人カード">
                            <a class="nav-link" th:href="@{'/applyCard?id='+${item.card_id}}" th:text="${item.card_name}">Mastercard®　个人卡 </a>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</section>
<hr>
<hr>

<hr>
<div class="container"> </div>
<footer class="text-center">
    <div class="container">
        <div class="row">
            <div class="col-12">
                <p>Copyright &copy; H &middot; All Rights Reserved &middot;</p>
            </div>
        </div>
    </div>
</footer>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/jquery-3.2.1.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/popper.min.js"></script>
<script src="js/bootstrap-4.0.0.js"></script>
<script th:inline="javascript">
    if([[${msg}]]){
        document.getElementById("msg-box").innerHTML = `<div class="alert alert-success alert-dismissible fade show" role="alert">
  <strong>${[[${msg}]]}</strong>
  <button type="button" class="close" data-dismiss="alert" aria-label="Close">
    <span aria-hidden="true">&times;</span>
  </button>
</div>`;
    }
</script>
</body>
</html>